namespace go cart
include 'common.thrift'
struct Cart{
	1:  i64                   ID            (api.body = "id")
	2:  i64                   ProductID     (api.body = 'product_id')
	3:  string                ProductImage  (api.body = 'product_image')
	4:  string                ProductName   (api.body = 'product_name')
	5:  double                ProductPrice  (api.body = 'product_price')
	6:  i64                   Number        (api.body = 'number')
	7:  list<CartProductSpec> SpecList      (api.body = 'spec_list')
}

struct CartProductSpec{
	1:  string Name   (api.body = 'name')
	2:  string Value  (api.body = 'value')
}

struct GetCartListRequest{
	254:  i64 Size = 20 (api.query = 'size')
	255:  i64 Page = 1  (api.query = 'page')
}

struct GetCartListResponse{
	1:  list<Cart>        Data        (api.body = 'data')
	2:  common.Pagination Pagination  (api.body = 'pagination')
}

struct AddCartRequest{
	1:  i64    ProductID  (api.body = 'product_id')
	2:  i64    Number     (api.body = 'number')
	3:  string SKUID      (api.body = 'sku_id')
}

struct AddCartResponse{

}

struct UpdateCartRequest{
	1:  i64 ID      (api.body = 'id')
	2:  i64 Number  (api.body = 'number')
}

struct UpdateCartResponse{

}

struct DeleteCartRequest{
	1:  list<i64> IDs  (api.body = 'ids')
}

struct DeleteCartResponse{

}

struct GetCartTotalRequest{

}

struct CartTotal{
	1:  i64 Total  (api.body = 'total')
}

struct GetCartTotalResponse{
	1:  CartTotal Data  (api.body = 'data')
}
